package cn.wolfcode.luowowo.member.mapper;

import cn.wolfcode.luowowo.member.domain.UserInfo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface UserInfoMapper {
    int deleteByPrimaryKey(Long id);

    int insert(UserInfo record);

    UserInfo selectByPrimaryKey(Long id);

    List<UserInfo> selectAll();

    int updateByPrimaryKey(UserInfo record);

    int selectCountByPhone(String checkPhone);

    UserInfo selectUserByPhoneAndPassword(@Param("phone") String phone, @Param("password") String password);

    int getCountForAttention(Long id);

    int getCountForFans(Long uid);

    List<Long> getAttentionId(Long uid);

    List<UserInfo> selectAttentionByIds(List<Long> attArray);

    void updateHeadImgUrl(@Param("url") String url, @Param("uid") Long uid);

    void updateGoldMedal(int i,Long id);

    List<String> getAllPhone();

    void updatePhone(@Param("phone") String phone, @Param("newMobile") String newMobile);

    UserInfo selectJinPaiById(Long userId);

    void insertRelationship(@Param("userInfoId") Long userInfoId, @Param("userId") Long userId);

    void deleteRelationship(@Param("id") Long id, @Param("userInfoId") Long userInfoId);
}